/**
 * \file Enemy.h
 * \author Niels van Galen Last & Erik Kok
 * \date 01-15-08
 */
#ifndef ENEMY_H
#define ENEMY_H

#include "Character.h"

#include "OgreOde_Core/OgreOde_Core.h"

#include "BoidAirCraft.h"
#include "BoidManager.h"
#include "BehaviorSeek.h"
#include "BehaviorSeparation.h"
#include "BehaviorCohesion.h"
#include "BehaviorAlignment.h"

/**
 * An enemy who must be defeated by the player.
 */
class Enemy
{
public:
	typedef std::pair<BoidAirCraftPtr, Behavior*> CraftBehaviorPair;
	typedef std::vector<CraftBehaviorPair> CraftList;
	CraftList mAirCraftBoids;

	/// Default constructor
	Enemy() {}
		
	/// Overloaded constructor
	Enemy(String name, OgreOde::World* world, Vector3 position, CraftList craft2);
		
	/// Default destructor
	~Enemy();

	/**
	 * Set this enemy visible in the game
	 * \param visible True if we want to see the enemy
	 */
	void setVisible(bool visible);

	/// Create a new enemy
	void create_enemy();

	/**
	 * Returns a vector with the current position of the enemy
	 * \return Vector3 the position
	 */
	Vector3 get_position() const;

	/**
	 * To get the name of this enemy
	 * \return mName The name
	 */
	Ogre::String get_name() { return mName; }
	

	/**
	 * Update the position of this enemy
	 * \param Vector3 The vector with the position of the enemy
	 */
	void update_position(Vector3);

private:
	Ogre::String			mName;
    Vector3                 mTranslateVector;
    Vector3                 mPosition;
    Radian                  mRotX, mRotY;

    OgreOde::Body           *mBody;
    OgreOde::Geometry       *mGeom;
    OgreOde::World          *mWorld;
    OgreOde::BoxMass        *mMass;
    OgreOde::Space          *mSpace;

    Ogre::SceneNode         *enemy_node;
    Ogre::Entity            *enemy_entity;
    Ogre::SceneManager      *mSceneMgr;


};


#endif
